package com.bicon.botu.mall.member.rpc.service;

import com.bicon.botu.core.base.common.controller.BaseController;
import com.bicon.botu.mall.member.service.ICartService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 购物车rpc
 *
 * @author 李双喜
 * @date 2018/5/21 15:52
 */

@Service
public class CartRpcService extends BaseController {
    @Autowired
    private ICartService iCartService;

    /**
     * 根据多个id删除购物车
     *
     * @param productRepertoryId 多个skuId
     * @return
     */
    @RequestMapping(value = "/deleteCart", method = RequestMethod.POST)
    public Boolean deleteCart(@RequestParam(value = "productRepertoryId") List<String> productRepertoryId,@RequestParam(value = "userId")String userId) {
        Boolean result = iCartService.deleteCart(productRepertoryId,userId);
        return result;
    }
}
